package com.desaysv.hicar;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.CompoundButton;

import com.desaysv.svview.weight.CountNumberView;
import com.desaysv.svview.weight.UISwitchButton;

public class MainViewActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_view);

        CountNumberView countNumberView=findViewById(R.id.countTxt);
        countNumberView.showNumberWithAnimation(100.10f,CountNumberView.FLOATREGEX);

        UISwitchButton usb=findViewById(R.id.usb);
        usb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                countNumberView.showNumberWithAnimation(300.10f,CountNumberView.FLOATREGEX);
            }
        });
    }
}